<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
  var test = 20;
  test = "张三";
  alert(test);

  /*
    var:
      1. 作用域：全局变量
      2. 变量可以重复定义

  */

  {
    var age = 20;
    // let age = 30;
    // let age = 20;
  }

  alert(age);

  const PI = 3.14;
  PI = 3;

</script>



</body>
</html>